package zheng.es;


import org.elasticsearch.index.query.AbstractQueryBuilder;
import org.elasticsearch.index.query.QueryBuilder;
import org.elasticsearch.index.query.RangeQueryBuilder;
import org.elasticsearch.search.aggregations.AggregationBuilder;

import java.util.List;

/**
 * @author heshuangxi
 */
public class BatchQueryParam {

    //索引名称
    private String indexName;

    //精准和模糊查询条件
    private List<AbstractQueryBuilder> abstractQueryBuilderList;

    //范围查询条件
    private  List<RangeQueryBuilder> rangeQueryBuilderList;

    /**
     * 与“且”并列的“或”查询条件组
     */
    private  List<List<QueryBuilder>> shouldClauseGroups;

    //聚合条件
    private  AggregationBuilder aggregation;

    //排序字段
    private  String fieldSort;

    //排序方式 desc asc
    private  String sortMethod;

    //开始位置
    private Integer from;

    //条数
    private Integer size;

    //包含字段
    private String[] includes;

    //排除字段字段
    private String[] excludes;

    //searchAfter唯一标识
    private List<Object> searchAfterList;

    private String uniqueColumnName;


    public String getIndexName() {
        return indexName;
    }

    public void setIndexName(String indexName) {
        this.indexName = indexName;
    }

    public List<AbstractQueryBuilder> getAbstractQueryBuilderList() {
        return abstractQueryBuilderList;
    }

    public void setAbstractQueryBuilderList(List<AbstractQueryBuilder> abstractQueryBuilderList) {
        this.abstractQueryBuilderList = abstractQueryBuilderList;
    }

    public List<RangeQueryBuilder> getRangeQueryBuilderList() {
        return rangeQueryBuilderList;
    }

    public void setRangeQueryBuilderList(List<RangeQueryBuilder> rangeQueryBuilderList) {
        this.rangeQueryBuilderList = rangeQueryBuilderList;
    }

    public List<List<QueryBuilder>> getShouldClauseGroups() {
        return shouldClauseGroups;
    }

    public void setShouldClauseGroups(List<List<QueryBuilder>> shouldClauseGroups) {
        this.shouldClauseGroups = shouldClauseGroups;
    }

    public AggregationBuilder getAggregation() {
        return aggregation;
    }

    public void setAggregation(AggregationBuilder aggregation) {
        this.aggregation = aggregation;
    }

    public String getFieldSort() {
        return fieldSort;
    }

    public void setFieldSort(String fieldSort) {
        this.fieldSort = fieldSort;
    }

    public String getSortMethod() {
        return sortMethod;
    }

    public void setSortMethod(String sortMethod) {
        this.sortMethod = sortMethod;
    }

    public Integer getFrom() {
        return from;
    }

    public void setFrom(Integer from) {
        this.from = from;
    }

    public Integer getSize() {
        return size;
    }

    public void setSize(Integer size) {
        this.size = size;
    }

    public String[] getIncludes() {
        return includes;
    }

    public void setIncludes(String[] includes) {
        this.includes = includes;
    }

    public String[] getExcludes() {
        return excludes;
    }

    public void setExcludes(String[] excludes) {
        this.excludes = excludes;
    }

    public List<Object> getSearchAfterList() {
        return searchAfterList;
    }

    public void setSearchAfterList(List<Object> searchAfterList) {
        this.searchAfterList = searchAfterList;
    }

    public String getUniqueColumnName() {
        return uniqueColumnName;
    }

    public void setUniqueColumnName(String uniqueColumnName) {
        this.uniqueColumnName = uniqueColumnName;
    }
}
